package com.bdqn.service.impl;

import com.bdqn.mapper.RoleMapper;
import com.bdqn.pojo.Right;
import com.bdqn.pojo.Role;
import com.bdqn.service.RoleService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {
    @Resource
    private RoleMapper roleMapper;

    @Override
    public List<Role> list() {
        return roleMapper.list();
    }

    @Override
    public List<Right> findAllRights() {
        return roleMapper.findAllRights();
    }

    @Override
    public List<Right> findRightsByRole(Role role) {
        return roleMapper.findRightsByRole(role);
    }
}
